1. Field of the Invention
The present invention generally relates to data processing and more particularly to user interfaces for accessing data.
2. Description of the Related Art
Databases are computerized information storage and retrieval systems. A relational database management system is a computer database management system (DBMS) that uses relational techniques for storing and retrieving data. The most prevalent type of database is the relational database, a tabular database in which data is defined so that it can be reorganized and accessed in a number of different ways.
Regardless of the particular architecture, in a DBMS, a requesting entity (e.g., an application or the operating system) demands access to a specified database by issuing a database access request. Such requests may include, for instance, simple catalog lookup requests or transactions and combinations of transactions that operate to read, change and add specified records in the database. These requests are made using high-level query languages such as the Structured Query Language (SQL). Illustratively, SQL is used to make interactive queries for getting information from and updating a database such as International Business Machines' (IBM) DB2, Microsoft's SQL Server, and database products from Oracle, Sybase, and Computer Associates. The term “query” denominates a set of commands for retrieving data from a stored database. Queries take the form of a command language that lets programmers and programs select, insert, update, find out the location of data, and so forth.
Often, the queries take the form of hierarchical conditions. As defined herein, a simple condition is a comparison operation (e.g., >, <, =). An illustrative simple condition is (employeeName=‘Rich’). One or more simple conditions may then be grouped together by Boolean logic operators to produce complex (or grouped) conditions. An example of a complex condition is ((employeeName=‘Rich’) OR (employeeName=‘John’)). Further, simple conditions and complex conditions may be connected by Boolean logic operators to produce a hierarchy of conditions. The representation of hierarchical conditions (including complex/grouped conditions) in a visual layout where users can intuitively manipulate the groups presents substantial difficulties. The problem is further complicated when the user interface to the underlying data must be a graphical user interface (GUI), such as a web browser, because of the limited GUI elements that are available to work with.
To understand the unique difficulties presented by hierarchical conditions consider the following illustrations.
Data Hierarchy Illustration
<employee><firstName>Rich</firstName><lastName>Dettinger</lastName></employee>Condition Hierarchy Illustration
<AND><OR><employeeName = ‘Rich’><employeeName = ‘John’><employeeHire before 01/01/2000>The first illustration (Data Hierarchy Illustration) is an XML data document fragment which has an obvious meaning. Specifically, the firstName and the lastName belong to the employee. It is therefore feasible to show only <employee> without loss of meaning because users have a fundamental understanding of the whole structure.
In contrast, the hierarchy of conditions illustrated above (Condition Hierarchy Illustration) is simply unrelated groupings. When the data represents conditions, a user interface cannot selectively not show subconditions because the user loses all context. This is because the hierarchy of conditions is arbitrary. For example, the above illustrated condition hierarchy represents the following relational expression: ((employeeName=‘Rich’) OR (employeeName=‘John’)) AND (employeeHire before 01/01/200). However, there is no reason that a user may not want the following query instead: (employeeName=‘Rich’) OR ((employeeName=‘John’) AND (employeeHire before 01/01/200)). This latter expression is considerably different than the first, but equally valid.
Accordingly, the ability to represent hierarchical conditions (including complex/grouped conditions) in a visual layout where users can intuitively manipulate the groups it critical to being able to generate valid mathematical operations, relational database queries, etc.
Therefore, there is a need for a method and system for visually representing hierarchical conditions capable of being manipulated by users.